import request from '@/utils/request'

// 查询管网设施配置列表
export function getPipeList(params) {
  return request({
    url: '/dispatch/backend/pipe/config/list',
    method: 'get',
    params
  })
}

// 获取管网设施配置详细信息
export function getPipeDetail(pipeId) {
  return request({
    url: `/dispatch/backend/pipe/config/${pipeId}`,
    method: 'get'
  })
}

// 新增管网设施配置
export function addPipe(data) {
  return request({
    url: '/dispatch/backend/pipe/config',
    method: 'post',
    data
  })
}

// 修改管网设施配置
export function updatePipe(data) {
  return request({
    url: '/dispatch/backend/pipe/config',
    method: 'put',
    data
  })
}

// 删除管网设施配置
export function deletePipe(pipeId) {
  return request({
    url: `/dispatch/backend/pipe/config/${pipeId}`,
    method: 'delete'
  })
}

// 获取字典数据
export function getDictData(params) {
  return request({
    url: '/dispatch/backend/pipe/config/common/dict/data',
    method: 'get',
    params
  })
}